<!DOCTYPE html>
<html lang='en'>
  <head>
    <meta charset='UTF-8' />
    <meta http-equiv='X-UA-Compatible' content='IE=edge' />
    <meta name='viewport' content='width=device-width, initial-scale=1.0' />
    <title>Document</title>
    <style>
        *{
            margin: 0;
            padding: 0;
        }

        .aa{
            color:red
        }
        .bb{
            color:green;
            width: 500px;
            height:100px;
            border: 10px solid pink;
            text-align: center;
            line-height: 100px;
        }
        .cc{
           font-size: 30px;
        
        }
        .dd{
            background-color: aqua;
        }
    </style>
  </head>
  <body>
    <div id='app'>
        <div :class=classA>
             我会变红
        </div>
        <div :class=[classB,classC]>变大变绿</div> 
        <div :class="{cc:num>=10}">变大变绿</div>
        <div :class="[classA,classB,{cc:num>=40}]">ds</div>
        <div :style="styleA">键值对的写法</div>
        <img :src=imgSrc alt="" width="400">
    </div>
    <script src='https://cdn.jsdelivr.net/npm/vue@2.7.14/dist/vue.js'></script>
    <script>
        let vm = new Vue({
            el:'#app',
            data:{
                classA:"aa",
                classB:"bb",
                classC:"cc",
                classD:"dd",
                num:30,
                styleA:{
                    color:"hotpink",
                    border:"2px solid red",
                    fontSize:"30px",
                    marginTop:"40px"
                },
                imgSrc:"https://n.sinaimg.cn/sinakd20200328ac/138/w600h338/20200328/f47c-irkazzw1727220.jpg"
            },
            methods:{
             
            }
        })
    </script>
  </body>
</html>
